<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>登录页</title>
    <link rel="stylesheet" href="/css/loginBox.css" />
    <style>
      body {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        background: linear-gradient(45deg, #eebd89, #d13abd);
      }
    </style>
  </head>
  <body>
    <div id="app">
      <div class="container-wrapper">
        <login-component @form-submitted="handleLoginForm"></login-component>
      </div>
    </div>
    <script src="/js/vue.js"></script>
    <script src="/js/loginBox.js"></script>
    <script>
      new Vue({
        el: "#app",
        methods: {
          handleLoginForm(formData) {
            // 处理登录逻辑
            if (formData.user === "admin" && formData.password === "123456") {
              alert("登录成功");
              location.href = "./orderPage.html";
            } else {
              alert("账号密码错误");
            }
          },
        },
      });
    </script>
  </body>
</html>
